home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 October
/
CHIP Turkiye Ekim 2000.iso
/
prog
/
share
/
23
/
setup.exe
/
mirror.lib
/
menu_gen.js
< prev
next >
Wrap
Text File
|
2000-06-27
|
4KB
|
102 lines
var temphide = "hide"
var tempshow = "show"
var tempnum = 0
var size = ""
var numitems = ""
var htemp = ""
var ttemp = ""
var position = ""
var numpos = 0
if (document.all) {
for (var count = 1; count <= menuLength; count++) {
position = eval(count) + "_position"
numpos = menuList[position] + navadj
document.write('<div ')
document.write('id="explorer' + count + '"')
document.write('style="position: absolute; overflow: none; left: 150; top: ' + numpos + '; z-index: 1; width: 169; visibility: hidden" ')
document.write('onMouseover="menu_over[' + count + '] = \'true\'; imgCheck()" ')
document.write('onMouseout="menu_over[' + count + '] = \'false\'; imgCheck()">')
makemenu(count)
document.write('</div>')
}
}
if (document.layers) {
for (var count = 1; count <= menuLength; count++) {
position = eval(count) + "_position"
numpos = menuList[position] + navadj
document.write('<layer name="navigator' + count + '" left=150 top=' + numpos + ' z-index=1 width=169 visibility="hide" ')
document.write('onMouseover="menu_over[' + count + '] = \'true\'; imgCheck()" ')
document.write('onMouseout="menu_over[' + count + '] = \'false\'; imgCheck()">')
makemenu(count)
document.write('</layer>')
}
}
function makemenu (which) {
tempVar = which
size = eval(which) + "_size"
numitems = eval(which) + "_numitems"
document.write('<TABLE WIDTH="169" CELLPADDING="0" CELLSPACING="0" BORDER="0">')
document.write('<TR>')
document.write('<TD WIDTH="169" COLSPAN="3"><IMG SRC="images/glo_menuborder_top.gif" WIDTH="169" HEIGHT="9" BORDER="0" HSPACE="0" VSPACE="0"></TD>')
document.write('</TR>')
document.write('<TR>')
document.write('<TD WIDTH="10" BGCOLOR="#FFFFFF" ROWSPAN="' + menuList[size] +'"><IMG SRC="images/glo_pxl_white.gif" WIDTH="10" HEIGHT="1" BORDER="0"></TD>')
document.write('<TD WIDTH="147" BGCOLOR="#FFFFFF" ROWSPAN="' + menuList[size] +'">')
if (navigator.appVersion.indexOf("Mac") != -1) {
document.write('<FONT FACE="ARIAL,HELVETICA" SIZE="3" COLOR="#000000">')
}
else {
document.write('<FONT FACE="ARIAL,HELVETICA" SIZE="2" COLOR="#000000">')
}
if (menuList[numitems] == 1) {
if (menuList[tempVar + '_href1'] != "") {
document.write('<a href="' + menuList[tempVar + "_href1"] + '">' + menuList[tempVar + "_text1"] +'</a>')
}
else {
document.write(menuList[tempVar + "_text1"])
}
}
else {
tempnum = 0
for (var count = 1; count <= menuList[numitems]; count++) {
tempnum++
htemp = tempVar + '_href' + tempnum
ttemp = tempVar + '_text' + tempnum
if (menuList[htemp] != "") {
document.write('<a href="' + menuList[htemp] + '">' + menuList[ttemp] +'</a>')
}
else {
document.write(menuList[ttemp])
}
if (count != menuList[numitems]) {
document.write('<br><br>')
}
}
}
document.write('</FONT><br><img src="images/glo_pxl_white.gif" width="147" height="1" border="0">')
document.write('</TD>')
document.write('<TD WIDTH="12"><IMG SRC="images/glo_menuborder_mid.gif" WIDTH="12" HEIGHT="26" BORDER="0"></TD></TR>')
if (menuList[size] > 1) {
for (var count = 2; count <= menuList[size]; count++) {
document.write('<TR><TD WIDTH="12"><IMG SRC="images/glo_menuborder_mid.gif" WIDTH="12" HEIGHT="26" BORDER="0"></TD></TR>')
}
}
document.write('<TR>')
document.write('<TD WIDTH="169" COLSPAN="3"><IMG SRC="images/glo_menuborder_btm.gif" WIDTH="169" HEIGHT="9" BORDER="0"></TD>')
document.write('</TR>')
document.write(' </TABLE>')
}